const cdn = {
 	css: [
		'https://unpkg.com/tdesign-vue/dist/tdesign.min.css'
	],
 	js: [
		'https://fastly.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js',
		'https://fastly.jsdelivr.net/npm/vue-router@3.2.0/dist/vue-router.min.js',
		'https://fastly.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js',
		'https://unpkg.com/@vue/composition-api@1.7.0/dist/vue-composition-api.prod.js',
		'https://unpkg.com/tdesign-vue/dist/tdesign.min.js',
		'https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.min.js'
 	]
};

// 是否为生产模式
const isProd = process.env.NODE_ENV.startsWith('prod')

const externals = {
	vue: 'Vue',
	'vue-router': 'VueRouter',
	vuex: 'Vuex',
	'tdesign-vue': 'TDesign',
	echarts: 'echarts'
}

module.exports = {
	// cdn导入
	// chainWebpack: config => {
	// 	config.set('externals', externals)
	// 	config.plugin('html').tap(argss => {
	// 		argss[0].cdn = cdn
	// 		return argss
	// 	})
	// },
	transpileDependencies: true,
	lintOnSave: false,
	productionSourceMap: false,
	devServer: {
		proxy: 'https://oaapi.chimeng.xyz',
		// proxy: 'http://127.0.0.1:3000'
	},
};